// 表单配置
export const fieldList = ref([
  {
    field: "site_code",
    type: "select",
    originField: "amazonSite",
    multiple: true,
    collapseTags: true,
    options: { placeholder: "国家" },
    style: { width: "200px" },
  },
  {
    field: "skuRange",
    placeholder: "可批量搜索",
    type: "textarea",
    select: [{ label: "SKU", value: "sku" }],
    style: { width: "200px" },
  },
  {
    field: "asinRange",
    placeholder: "可批量搜索",
    type: "textarea",
    select: [{ label: "ASIN", value: "asin" }],
    style: { width: "200px" },
  },

  {
    field: "storeRange",
    placeholder: "可批量搜索",
    type: "textarea",
    select: [
      { label: "Asin店铺", value: "store_id" },
      { label: "跟卖店铺", value: "follow_store_id" },
    ],
    style: { width: "200px" },
  },
  {
    field: "userRange",
    type: "cascaderNew",
    selectStyle: { width: "120px" },
    select: [
      { label: "运营人员", value: "operator_user" },
      { label: "添加人员", value: "created_by" },
    ],
    style: { width: "200px" },
  },

  {
    field: "timeRange",
    type: "dateTimeRangeNorm",
    select: [
      { label: "添加时间", value: "created_at" },
      { label: "更新时间", value: "updated_at" },
    ],
    style: { width: "360px" },
  },
])

// 表格 列配置
export const tableColumns = ref([
  {
    title: "SKU\n自定义SKU",
    width: 150,
    slots: {
      default: ({ row }) => (
        <div>
          <VText value={row.base_asin_list.sku} line={1} />
          <VText value={row.base_asin_list.custom_sku} line={1} />
        </div>
      ),
    },
  },
  {
    field: "base_asin_list.asin",
    title: "ASIN",
    width: 120,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.asin} line={1} /> },
  },
  {
    field: "site_code",
    title: "国家",
    width: 100,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.site_code} line={1} /> },
  },
  {
    field: "store_name",
    title: "ASIN店铺",
    width: 160,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.store_name} line={1} /> },
  },

  {

    title: "跟卖店铺",
    width: 180,
    slots: { default: "SubStoreName" },
  },

  {
    field: "activity_status_text",
    title: "活跃状态",
    width: 80,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.activity_status_text} line={1} /> },
  },
  {
    field: "sku_title",
    title: "商品名称",
    width: 260,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.sku_title} line={2} /> },
  },
  {
    title: "状态",
    field: "status_text",
    width: 100,
    slots: { default: ({ row }) => <VStatus value={row.status_text == "启用"} /> },
  },
  {
    field: "operator_user_text",
    title: "运营人员",
    width: 120,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.operator_user_text} line={1} /> },
  },
  {
    field: "department_name",
    title: "部门",
    width: 200,
    slots: { default: ({ row }) => <VText value={row.base_asin_list.department_name} line={1} /> },
  },
  {
    field: "created_at",
    title: "添加时间",
    width: 180,
    slots: { default: ({ row }) => <VText value={row.created_at} line={1} /> },
  },
  {
    field: "created_by_text",
    title: "添加人",
    width: 120,
    slots: { default: ({ row }) => <VText value={row.created_by_text} line={1} /> },
  },
])

const addAsinFieldList = [
  {
    field: "site_id",
    type: "select",
    originField: "amazonSite",
    multiple: true,
    collapseTags: true,
    options: { placeholder: "国家" },
    style: { width: "200px" },
  },
  {
    field: "skuRange",
    placeholder: "可批量搜索",
    type: "textarea",
    select: [
      { label: "SKU", value: "sku" },
      { label: "自定SKU", value: "custom_sku" },
      { label: "ASIN", value: "asin" },
    ],
    style: { width: "200px" },
  },
]
